﻿<%@ Page Language="C#" Inherits="E.Web.Teacher.classes.ClassList" %>
<%@ Import Namespace="E.Model" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
  <title>班级列表</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
  <link rel="stylesheet" href="/css/main.css" type="text/css" media="all" />
  <link rel="stylesheet" href="/css/t_main.css" type="text/css" media="all" />
  <link rel="stylesheet" href="/css/class.css" type="text/css" media="all" />
  <link rel="stylesheet" href="/css/flora.datepick.css" type="text/css" media="all" />
  <script type="text/javascript" src="/js/Common.js"></script>
  <script type="text/javascript" src="/js/jquery-1.4.2.min.js"></script>
  <script type="text/javascript" src="/js/jquery.datepick.min.js"></script>
  <script type="text/javascript" src="/js/jquery.datepick-zh-CN.js"></script>
  <script type="text/javascript">
    $(document).ready(
      function() {
        $("#StartFromDateTxt").datepick({ dateFormat: 'yy-mm-dd', showOn: 'button', buttonImage: '/images/icon/calendar-green.gif', buttonImageOnly: true });
        $("#StartToDateTxt").datepick({ dateFormat: 'yy-mm-dd', showOn: 'button', buttonImage: '/images/icon/calendar-green.gif', buttonImageOnly: true });
        $("#EndFromDateTxt").datepick({ dateFormat: 'yy-mm-dd', showOn: 'button', buttonImage: '/images/icon/calendar-green.gif', buttonImageOnly: true });
        $("#EndToDateTxt").datepick({ dateFormat: 'yy-mm-dd', showOn: 'button', buttonImage: '/images/icon/calendar-green.gif', buttonImageOnly: true });
      }
    );
  </script>
</head>
<body>
  <form id="form1" action="?act=s" method="post">
    <div class="m_top"></div>
    <div class="block">
      <div style="width:650px; height:22px;">
        <div class="title">&nbsp;搜索条件</div>
      </div>
      <div class="spe_line_2"></div>
      <div style="width:650px; height:23px; margin-top:6px;">
        <div class="fl" style="line-height:23px;">班级编号：</div>
        <div class="fl"><input type="text" id="ClassCodeTxt" name="ClassCodeTxt" value="<%=classCode %>" /></div>
        <div class="fl" style="line-height:23px;">&nbsp;课程名称：</div>
        <div class="fl"><input type="text" id="CourseName" name="CourseName" value="<%=courseName %>" /></div>
      </div>
      <div style="width:650px; height:23px; margin-top:6px;">
        <div class="fl" style="line-height:23px;">课程类别：</div>
        <div class="fl">
          <select id="CourseCategorySlt" name="CourseCategorySlt">
            <option value="-1">全部</option>
            <% if (cc_list != null && cc_list.Count > 0) { %>
              <% foreach (CourseCategoryModel model in cc_list) { %>
            <option value="<%=model.ID %>"><%=model.Name%></option>
              <% } %>
            <% } %>
          </select>
        </div>
        <div class="fl" style="line-height:23px;">&nbsp;地点：</div>
        <div class="fl">
          <select id="AreaSlt" name="AreaSlt">
            <option value="-1">全部</option>
            <% if (areaList != null && areaList.Count > 0) { %>
              <% foreach (DictAreaModel model in areaList) { %>
            <option value="<%=model.ID %>"><%=model.Name%></option>
              <% } %>
            <% } %>
          </select>
        </div>
      </div>
      <div style="width:650px; height:23px; margin-top:6px;">
        <div class="fl" style="line-height:23px;">开始时间：</div>
        <div class="fl"><input id="StartFromDateTxt" name="StartFromDateTxt" value="<%=startFromDate %>" />&nbsp;至&nbsp;<input id="StartToDateTxt" name="StartToDateTxt" value="<%=startToDate %>" /></div>
      </div>
      <div style="width:650px; height:23px; margin-top:6px;">
        <div class="fl" style="line-height:23px;">结束时间：</div>
        <div class="fl"><input id="EndFromDateTxt" name="EndFromDateTxt" value="<%=endFromDate %>" />&nbsp;至&nbsp;<input id="EndToDateTxt" name="EndToDateTxt" value="<%=endToDate %>" /></div>
        <div class="fl"><input type="image" src="/images/btn/search.gif" style="width:54px; height:23px; margin-left:20px;" /></div>
      </div>
    </div>
    
    <div class="block_2" style="height:340px; display:table;">
      <div style="width:650px; height:22px;">
        <div class="title">&nbsp;搜索结果</div>
      </div>
      <div class="spe_line_2"></div>
      
      <% if (classList != null && classList.Count > 0) { %>
    
      <div id="datatable">
        <div class="data_rows" style="font-weight:bolder;">
          <div class="d_r_i">ID</div>
          <div class="d_r_cd">班级编号</div>
          <div class="d_r_e">课程</div>
          <div class="d_r_c">类别</div>
          <div class="d_r_a">地点</div>
          <div class="d_r_d">开班时间</div>
          <div class="d_r_o">操作</div>
        </div>
        
         <% foreach (ShortClassModel model in classList) { %>
        <div class="data_rows">
          <div class="d_r_i"><%=model.ID%></div>
          <div class="d_r_cd"><%=model.ClassCode%></div>
          <div class="d_r_e"><%=model.CourseName%></div>
          <div class="d_r_c"><%=model.CourseCategoryName%></div>
          <div class="d_r_a"><%=model.AreaName%></div>
          <div class="d_r_d"><%=model.StartTime.ToString("yyyy.MM.dd") %>-<%=model.EndTime.ToString("yyyy.MM.dd")%></div>
          <div class="d_r_o"><a href="/classes/View.aspx?id=<%=model.ID %>">查看</a></div>
        </div>
      
         <% } %>
        
      </div>
      
      <div class="fr" style="margin:8px 0 0 0;"><%=mypager%></div>
      
      <%} %>
    </div>
  </form>
  <script type="text/javascript">
  <% if (areaid != -1){ %>
  document.getElementById("AreaSlt").value = <%=areaid %>;
  <% } %>
  <% if (categoryid != -1){ %>
  document.getElementById("CourseCategorySlt").value = <%=categoryid%>;
  <% } %>
  </script>
</body>
</html>
